 
<header id="header" class="mui-bar mui-bar-black mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav mui-pull-left"  href="{:url('site/site_list')}"></a>
    <h1 class="mui-title">{$result.building_name}</h1>
</header>
{include file="site/site_nav" /}
<div class="mui-content mui-content-my finance-msg" style="margin-top: 0;padding-top: 0">
    <div class="finance-msg-top">
        <div>
            <img src="__CDN__/style/images/zhichu1.png" alt="">支出 <b>¥{$zcsum}</b>
        </div>
        <div>
            <img src="__CDN__/style/images/shouru1.png" alt="">收入 <b>¥{$srsum}</b>
        </div>
    </div>
    <div class="finance-msg-con">
        <ul>
{volist name="list.rows" id="vv"}  
            <li class="<?php if($vv['apply_type'] ==2){echo 'zhichu'; }else{echo 'shouru';} ?>">
                <div class="finance-msg-con-left">
                    <h2>{$vv.parent_code}</h2>
                    <p><span>{$vv.code}</span> <?php echo date("Y-m-d",$vv['apply_time'])?></p>
                </div>
                <div class="finance-msg-con-right">
                    <?php if($vv['apply_type'] ==2){echo '-'; }else{echo '+';} ?>{$vv.amount}
                </div>
            </li>
 {/volist} 
        </ul>
    </div>
</div>
<div class="mui-content-padded btn-bottom-fixed"><a href="{:url('finance/finance_add')}">
    <button style="background: linear-gradient(-90deg, #3383FD, #78C2FF);border: none" type="button" class="mui-btn mui-btn-primary mui-btn-block">财务申报</button></a>
</div>
<script src="__CDN__/style/js/jquery-1.11.3.js"></script>
<script>
    $(function () {
        var startX=0,startY=0,moveEndX=0,moveEndY=0,X=0,Y=0,nowX=0;
        var a=$("#navBar");
        var navWidth=parseInt(a.css('width'));
        //var ulWidth=parseInt(a.children().css('width'));
        var ulWidth=parseInt(a.children().children().css('width'))*7+20;
        a.children().css('width',ulWidth);

        a.on("touchstart", function(e) {
            // e.preventDefault();
            startX = e.originalEvent.changedTouches[0].pageX;
            startY = e.originalEvent.changedTouches[0].pageY;
            nowX=parseInt(a.children().css('left'));
        });
        a.on("touchmove", function(e) {
            // e.preventDefault();
            moveEndX = e.originalEvent.changedTouches[0].pageX;
            moveEndY = e.originalEvent.changedTouches[0].pageY;
            X = moveEndX - startX;
            Y = moveEndY - startY;
            if ( Math.abs(X) > Math.abs(Y) && X > 0 ) {
                // alert("left 2 right");
                //console.log(X,Y);
                if((X+nowX)<0){
                    a.children().css('left',(X+nowX)+'px');
                }
            }
            else if ( Math.abs(X) > Math.abs(Y) && X < 0 ) {
                //alert("right 2 left");
                //console.log(navWidth,ulWidth,navWidth-ulWidth);
                //console.log(liWidth);
                if((X+nowX)>(navWidth-ulWidth)){
                    a.children().css('left',(X+nowX)+'px');
                }
            }
            else if ( Math.abs(Y) > Math.abs(X) && Y > 0) {
                //alert("top 2 bottom");
            }
            else if ( Math.abs(Y) > Math.abs(X) && Y < 0 ) {
                //alert("bottom 2 top");
            }
            else{
                //alert("just touch");
            }
        });
    });
</script>
 